feat(components): Add static class name with button style (#26639)

This commit is contained in:
Mark Skelton 2024-01-31 18:22:25 -06:00 committed by GitHub
parent a09e5557bc
commit 959a5a5ad6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 1 deletions

View File

@ -148,7 +148,14 @@ export default function Button(props: ButtonProps) {
<AntdButton
href={disabled ? undefined : href}
disabled={disabled}
className={cx(className, 'superset-button', { cta: !!cta })}
className={cx(
className,
'superset-button',
// A static class name containing the button style is available to
// support customizing button styles in embedded dashboards.
`superset-button-${buttonStyle}`,
{ cta: !!cta },
)}
css={{
display: 'inline-flex',
alignItems: 'center',