Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#Refactor/#25: 불필요한 Global CSS, Reset CSS 검토 및 Text 컴포넌트 wordBreak 속성 추가 #26

Merged
merged 5 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "concept-be-design-system",
"description": "컨셉비 디자인 시스템",
"version": "0.4.8",
"version": "0.4.9",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
Expand Down
8 changes: 7 additions & 1 deletion src/components/Text/Text.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import styled from '@emotion/styled';
import { ReactNode, ElementType, ComponentPropsWithoutRef } from 'react';
import {
ReactNode,
ElementType,
ComponentPropsWithoutRef,
CSSProperties,
} from 'react';

import { ReactComponent as SVGTextRequired } from '../../assets/svg/text_required.svg';
import { ColorKeyType, FontKeyType } from '../../styles/theme';
Expand All @@ -10,6 +15,7 @@ type Props<T extends ElementType> = {
font?: FontKeyType;
color?: ColorKeyType;
required?: boolean;
wordBreak?: CSSProperties['wordBreak'];
} & ComponentPropsWithoutRef<T>;

const Text = <T extends ElementType>({
Expand Down
30 changes: 2 additions & 28 deletions src/styles/globalStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,22 @@ import { css } from '@emotion/react';

export const GlobalStyles = css`
#root {
height: 100vh;
width: 100%;
margin: 0 auto;
}

* {
font-family: 'SUIT', sans-serif;
}

body {
margin: 0;
display: flex;
place-items: center;
overflow: hidden;
min-height: 100vh;
min-height: -webkit-fill-available;
user-select: none;
}

input {
box-sizing: border-box;
padding: 0;
margin: 0;
border: none;
outline: none;
}
textarea {
box-sizing: border-box;
padding: 0;
margin: 0;
resize: none;
border: none;
outline: none;
}

::-webkit-scrollbar {
width: 4px;
}

::-webkit-scrollbar-thumb {
background-color: #00000066;
border-radius: 16px;
}

::-webkit-scrollbar-track {
margin-top: 14px;
opacity: 0;
Expand Down
17 changes: 17 additions & 0 deletions src/styles/reset.css
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,23 @@ video {
vertical-align: baseline;
}

input {
box-sizing: border-box;
padding: 0;
margin: 0;
border: none;
outline: none;
}

textarea {
box-sizing: border-box;
padding: 0;
margin: 0;
resize: none;
border: none;
outline: none;
}

button {
border: none;
background: none;
Expand Down
Loading