diff --git a/CHANGELOG.md b/CHANGELOG.md index f2b82c77..873826c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +## [1.5.6](https://github.com/deriv-com/ui/compare/v1.5.5...v1.5.6) (2024-02-15) + + +### 📦 Code Refactoring + +* Added max-height for dropdown list ([8519176](https://github.com/deriv-com/ui/commit/8519176af284945dd6864c7f9d56fa58a458b5d6)) +* Added xs in style ([0e4c564](https://github.com/deriv-com/ui/commit/0e4c564840afc90fe823cffc17e8da2d4b7b2268)) +* made changes in css file ([45a2c4e](https://github.com/deriv-com/ui/commit/45a2c4e01ce6c7a6a0417913f3aecc54885fc901)) + +## [1.5.5](https://github.com/deriv-com/ui/compare/v1.5.4...v1.5.5) (2024-02-15) + + +### ♻️ Chores + +* expose all props to button ([d8f45d1](https://github.com/deriv-com/ui/commit/d8f45d10b08e0912e5398d5239c108da4373e5f6)) + ## [1.5.4](https://github.com/deriv-com/ui/compare/v1.5.3...v1.5.4) (2024-02-14) diff --git a/lib/components/Button/index.tsx b/lib/components/Button/index.tsx index 903effdb..f737c509 100644 --- a/lib/components/Button/index.tsx +++ b/lib/components/Button/index.tsx @@ -8,37 +8,28 @@ import './Button.scss'; type TVariant = 'contained' | 'ghost' | 'outlined'; type TColor = 'black' | 'primary-light' | 'primary' | 'white'; -interface ButtonProps { - ariaLabel?: ComponentProps<'button'>['aria-label']; +interface ButtonProps extends ComponentProps<'button'> { color?: TColor; - disabled?: ComponentProps<'button'>['disabled']; icon?: ReactElement; isFullWidth?: boolean; isLoading?: boolean; - onClick?: ComponentProps<'button'>['onClick']; rounded?: Extract; size?: Extract; textSize?: ComponentProps['size']; - type?: ComponentProps<'button'>['type']; variant?: TVariant; - className?: string; } export const Button = ({ - ariaLabel, children, color = 'primary', - disabled = false, icon, isFullWidth = false, isLoading = false, - onClick, rounded = 'sm', size = 'md', textSize, - type, variant = 'contained', - className + ...props }: PropsWithChildren) => { const isContained = variant === 'contained'; @@ -49,7 +40,7 @@ export const Button = ({ `derivs-button__rounded--${rounded}`, isContained && `derivs-button__color--${color}`, isFullWidth && 'derivs-button__full-width', - className + props.className ); type TButtonFontColor = { @@ -94,11 +85,9 @@ export const Button = ({ return ( + ); + }; + useEffect(() => { setItems(list); }, [list]); @@ -114,6 +129,7 @@ export const Dropdown = ({ >
setShouldFilterList(true)} readOnly={variant !== 'comboBox'} - leftPlaceholder={icon ? icon : undefined} - rightPlaceholder={ ( - - )} + leftPlaceholder={icon ? icon : undefined} + rightPlaceholder={} type='text' value={value} {...getInputProps()} + {...rest} />
    - {isOpen && + {isOpen && ( items.map((item, index) => (
  • - ))} + )) + ) + }
); diff --git a/package-lock.json b/package-lock.json index 71ba49d4..437980d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@deriv-com/ui", - "version": "1.5.4", + "version": "1.5.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@deriv-com/ui", - "version": "1.5.4", + "version": "1.5.6", "devDependencies": { "@semantic-release/changelog": "^6.0.3", "@semantic-release/git": "^10.0.1", diff --git a/package.json b/package.json index 3e7210be..b1b3e02c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@deriv-com/ui", "private": false, - "version": "1.5.4", + "version": "1.5.6", "type": "module", "main": "dist/main.js", "files": [ diff --git a/src/stories/Button.stories.ts b/src/stories/Button.stories.ts index 45d7fca0..3529d6ff 100644 --- a/src/stories/Button.stories.ts +++ b/src/stories/Button.stories.ts @@ -31,7 +31,7 @@ const meta = { options: ['contained', 'outlined', 'ghost'], control: { type: 'radio' }, }, - ariaLabel: { + 'aria-label': { table: { disable: true, }