Fix bug and optimzed code

This commit is contained in:
2023-11-06 11:27:29 +07:00
parent 96d1e6038c
commit 7bfc2bcfa4
32 changed files with 285 additions and 224 deletions
@@ -1,7 +1,9 @@
import styled, { css } from 'styled-components';
type TButtonStyle = 'primary' | 'secondary';
interface IButtonStyle {
styled?: 'primary' | 'secondary';
styled?: TButtonStyle;
}
const Button = styled.button<IButtonStyle>`
@@ -11,7 +13,7 @@ const Button = styled.button<IButtonStyle>`
font-weight: 600;
cursor: pointer;
border-radius: var(--radius-md);
${(props) =>
@@ -5,7 +5,7 @@ const ButtonIcon = styled.button`
padding: 8px;
transition: all 0.2s;
border: none;
border-radius: var(--radius-md);
@@ -5,9 +5,9 @@ const CommonInput = css`
border-radius: var(--radius-sm);
padding: 10px 20px;
font-size: var(--fs-sm-x);
width: 200px;
`;
@@ -1,7 +1,9 @@
import styled, { css } from 'styled-components';
type TDirection = 'vertical' | 'horizontal';
interface IDirection {
type?: 'vertical' | 'horizontal';
type?: TDirection;
}
const Direction = styled.div<IDirection>`
+3 -1
View File
@@ -3,8 +3,10 @@ import styled, { css } from 'styled-components';
// Styled
import CommonInput from './CommonInput';
type TInput = 'text' | 'checkbox' | 'hidden';
interface IInputTyped {
type?: 'text' | 'checkbox' | 'hidden';
type?: TInput;
}
const Input = styled.input<IInputTyped>`