Skip to content

Commit

Permalink
#Refactor/#25: 불필요한 Global CSS, Reset CSS 검토 및 Text 컴포넌트 wordBreak 속성…
Browse files Browse the repository at this point in the history
… 추가 (#26)

* refactor: 불필요한 Global CSS 속성 제거

* refactor: 불필요한 Reset Css 속성 제거

* feat: Text 컴포넌트 WordBreak 속성 추가

* chore: 0.4.9 버전업 배포

* fix: font SUIT 미적용 오류 수정
  • Loading branch information
semnil5202 authored Mar 21, 2024
1 parent e155759 commit cb38821
Show file tree
Hide file tree
Showing 6 changed files with 749 additions and 346 deletions.
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

0 comments on commit cb38821

Please sign in to comment.