diff --git a/ui-kit/src/components/Button/index.tsx b/ui-kit/src/components/Button/index.tsx index ef5d13f7..2a7f782f 100644 --- a/ui-kit/src/components/Button/index.tsx +++ b/ui-kit/src/components/Button/index.tsx @@ -9,7 +9,7 @@ interface ButtonBaseProps { type ButtonProps = CombineElementProps<'button', ButtonBaseProps>; const Button = ( - { size = 'small', disabled, style, ...props }: ButtonProps, + { size = 'small', disabled, style, onClick, ...props }: ButtonProps, ref: Ref ) => { return ( @@ -18,6 +18,7 @@ const Button = ( disabled={disabled} style={style} ref={ref} + onClick={onClick} > diff --git a/ui-kit/src/components/Text/index.tsx b/ui-kit/src/components/Text/index.tsx index a18f57b8..c1fa78bc 100644 --- a/ui-kit/src/components/Text/index.tsx +++ b/ui-kit/src/components/Text/index.tsx @@ -1,7 +1,7 @@ import React, { ElementType, Ref, forwardRef } from 'react'; import { DEFAULT_ELEMENT, FontWeights, Typographys } from './types'; import { OverridableProps } from 'types/OverridableProps'; -import clxs from 'classnames'; +import classnames from 'classnames'; interface TextBaseProps { typography?: Typographys; @@ -10,7 +10,7 @@ interface TextBaseProps { type TextProps = OverridableProps; const Text = ( - { typography = 'p1', fontWeight = 'regular', as, ...props }: TextProps, + { typography = 'p1', fontWeight = 'regular', as, className, ...props }: TextProps, ref: Ref ) => { const target = as ?? DEFAULT_ELEMENT; @@ -18,10 +18,10 @@ const Text = ( return ( ); diff --git a/ui-kit/src/components/Toast/index.tsx b/ui-kit/src/components/Toast/index.tsx index 2cd9d233..b2d3a03a 100644 --- a/ui-kit/src/components/Toast/index.tsx +++ b/ui-kit/src/components/Toast/index.tsx @@ -15,7 +15,7 @@ const getTranslateAnimation = (align: ToastAlign) => { }; case 'center': return { - from: 'translateY(100%)', + from: 'translateY(-100%)', to: 'translateY(0)', }; case 'right': diff --git a/ui-kit/src/sass/components/_Toast.scss b/ui-kit/src/sass/components/_Toast.scss index 14dfed35..a98267da 100644 --- a/ui-kit/src/sass/components/_Toast.scss +++ b/ui-kit/src/sass/components/_Toast.scss @@ -1,3 +1,6 @@ +$toast-margin: 12px; +$toast-container-padding: 48px; + .lubycon-toast { overflow: visible; @@ -6,8 +9,10 @@ padding: 8px 16px; min-width: 336px; border-radius: 4px; - background-color: white; - margin: 12px 0; + background-color: get-color('gray80'); + margin: $toast-margin 0; + color: #ffffff; + -webkit-font-smoothing: antialiased; &--align-left { text-align: left; } @@ -34,15 +39,16 @@ %context-container { position: fixed; display: flex; - flex-direction: column-reverse; - top: auto; - bottom: 40px; + flex-direction: column; + top: $toast-container-padding; + bottom: auto; + margin: -$toast-margin 0; } .lubycon-toast__context-container { &--align-left { @extend %context-container; - left: 40px; + left: $toast-container-padding; right: auto; } &--align-center { @@ -54,6 +60,6 @@ &--align-right { @extend %context-container; left: auto; - right: 40px; + right: $toast-container-padding; } } diff --git a/ui-kit/src/stories/Toast.stories.tsx b/ui-kit/src/stories/Toast.stories.tsx index 23752824..d25d80d8 100644 --- a/ui-kit/src/stories/Toast.stories.tsx +++ b/ui-kit/src/stories/Toast.stories.tsx @@ -40,8 +40,9 @@ export const AutoHide = () => { export const ToastHooks = () => { const { openToast } = useToast(); return ( -
+
@@ -74,6 +76,7 @@ export const Align = () => { align: 'center', }) } + size="large" > Center @@ -84,6 +87,7 @@ export const Align = () => { align: 'right', }) } + size="large" > Right