Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[@mantine/core] Notification: spread closeButtonProps after iconSize, color #2205

Merged
merged 1 commit into from Aug 22, 2022

Conversation

emewjin
Copy link
Contributor

@emewjin emewjin commented Aug 22, 2022

original discord thread

Spread Notification's closeButtonProps after CloseButton's iconSize and color would be better experience to customize Notification's CloseButton. (override default prop iconSize=16, color=gray)

Like below code, for customizing, using CloseButton's props will better than using classNames because it is more simple and It can use CloseButton's predefined props.

// If using classNames to customize Notification's closeButton
const useStyles = createStyles(
  (theme) => ({
    closeButton: {
      color: theme.colors.gray[2],
      width: '44px',
      height: '44px',
    },
  })
);
const { classes } = useStyles();
<Notification classNames={{ ...classes }} />

// If using closeButtonProps to customize Notification's closeButton
<Notification closeButtonProps={{ color: 'gray.2', size: 'xl' }}  />

@rtivital rtivital changed the base branch from dev to master August 22, 2022 15:13
@rtivital rtivital changed the base branch from master to dev August 22, 2022 15:13
@rtivital rtivital merged commit 57a9fec into mantinedev:dev Aug 22, 2022
@rtivital
Copy link
Member

Thanks!

nmay231 pushed a commit to nmay231/mantine that referenced this pull request Aug 22, 2022
@emewjin emewjin deleted the notification-closebutton-props branch August 28, 2022 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants