Skip to content

Commit

Permalink
style: label => ariaLabel으로 변수명 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
jinhokim98 committed Oct 16, 2024
1 parent 0f57696 commit ad2d2ea
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ import {Text, useTheme} from '@components/Design';

interface Props {
value: string;
label: string;
ariaLabel?: string;
onClick: () => void;
disabled?: boolean;
}

export function Keypad({value, label, onClick, disabled = false}: Props) {
export function Keypad({value, ariaLabel, onClick, disabled = false}: Props) {
const {theme} = useTheme();
return (
<button
aria-label={label}
aria-label={ariaLabel}
css={css`
display: flex;
justify-content: center;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ export default function NumberKeyboard({type, maxNumber, initialValue, onChange}
</Button>
</div>
)}
{(type === 'amount' ? amountKeypads : numberKeypads).map(({keypad, label}) => (
{(type === 'amount' ? amountKeypads : numberKeypads).map(({keypad, ariaLabel}) => (
<Keypad
key={keypad}
value={keypad}
label={label}
ariaLabel={ariaLabel}
disabled={keypad === ''}
onClick={keypad === '<-' ? onClickDelete : () => onClickKeypad(keypad)}
/>
Expand Down
50 changes: 25 additions & 25 deletions client/src/components/Design/components/NumberKeyboard/keypads.ts
Original file line number Diff line number Diff line change
@@ -1,105 +1,105 @@
type Keypad = {
keypad: string;
label: string;
ariaLabel: string;
};

export const amountKeypads: Keypad[] = [
{
keypad: '1',
label: '1',
ariaLabel: '1',
},
{
keypad: '2',
label: '2',
ariaLabel: '2',
},
{
keypad: '3',
label: '3',
ariaLabel: '3',
},
{
keypad: '4',
label: '4',
ariaLabel: '4',
},
{
keypad: '5',
label: '5',
ariaLabel: '5',
},
{
keypad: '6',
label: '6',
ariaLabel: '6',
},
{
keypad: '7',
label: '7',
ariaLabel: '7',
},
{
keypad: '8',
label: '8',
ariaLabel: '8',
},
{
keypad: '9',
label: '9',
ariaLabel: '9',
},
{
keypad: '00',
label: '0 2개 버튼',
ariaLabel: '0 2개 버튼',
},
{
keypad: '0',
label: '0',
ariaLabel: '0',
},
{
keypad: '<-',
label: '직전 입력 지우기',
ariaLabel: '직전 입력 지우기',
},
];
export const numberKeypads: Keypad[] = [
{
keypad: '1',
label: '1',
ariaLabel: '1',
},
{
keypad: '2',
label: '2',
ariaLabel: '2',
},
{
keypad: '3',
label: '3',
ariaLabel: '3',
},
{
keypad: '4',
label: '4',
ariaLabel: '4',
},
{
keypad: '5',
label: '5',
ariaLabel: '5',
},
{
keypad: '6',
label: '6',
ariaLabel: '6',
},
{
keypad: '7',
label: '7',
ariaLabel: '7',
},
{
keypad: '8',
label: '8',
ariaLabel: '8',
},
{
keypad: '9',
label: '9',
ariaLabel: '9',
},
{
keypad: '',
label: '',
ariaLabel: '',
},
{
keypad: '0',
label: '0',
ariaLabel: '0',
},
{
keypad: '<-',
label: '직전 입력 지우기',
ariaLabel: '직전 입력 지우기',
},
];

0 comments on commit ad2d2ea

Please sign in to comment.