Skip to content

Commit 3b33eac

Browse files
committed
Make sure Toast action Bleed matches the action button size
1 parent d545835 commit 3b33eac

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

packages/bento-design-system/src/Toast/Config.ts

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export type ToastConfig = {
1111
messageSize: BodyProps["size"];
1212
closeIcon: (props: IconProps) => Children;
1313
closeIconSize: IconProps["size"];
14-
smallButtonPaddingY: BentoSprinkles["paddingY"];
1514
outline: boolean;
1615
internalSpacing: BentoSprinkles["gap"];
1716
elevation: "none" | "small" | "medium" | "large";

packages/bento-design-system/src/Toast/Toast.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ type Props = {
2626
*/
2727
export function Toast({ kind, message, action, onDismiss }: Props) {
2828
const config = useBentoConfig().toast;
29+
const buttonConfig = useBentoConfig().button;
2930
const { defaultMessages } = useDefaultMessages();
3031
return (
3132
<Box
@@ -42,7 +43,7 @@ export function Toast({ kind, message, action, onDismiss }: Props) {
4243
</Body>
4344
{action && (
4445
<Column width="content">
45-
<Bleed spaceY={config.smallButtonPaddingY}>
46+
<Bleed spaceY={buttonConfig.paddingY[config.buttonSize]}>
4647
<Button
4748
size={config.buttonSize}
4849
kind={config.buttonKind}

packages/bento-design-system/src/util/defaultConfigs.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,6 @@ export const toast: ToastConfig = {
443443
messageSize: "medium",
444444
closeIcon: IconClose,
445445
closeIconSize: 12,
446-
smallButtonPaddingY: button.paddingY.small,
447446
outline: false,
448447
internalSpacing: 16,
449448
elevation: "none",

0 commit comments

Comments
 (0)