Skip to content

Commit

Permalink
chore: add tooltip example in base button story
Browse files Browse the repository at this point in the history
  • Loading branch information
sbeaury committed Nov 27, 2024
1 parent c11814b commit 5f7698d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/ra-ui-materialui/src/button/Button.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { ReactNode } from 'react';
import { createTheme, ThemeProvider, Stack } from '@mui/material';
import { createTheme, ThemeProvider, Stack, Tooltip } from '@mui/material';
import type { PaletteColor } from '@mui/material';
import AddIcon from '@mui/icons-material/Add';

Expand Down Expand Up @@ -80,6 +80,14 @@ export const WithUserDefinedPalette = () => (
</ThemeProvider>
);

export const WithTooltip = () => (
<ThemeProvider theme={theme}>
<Tooltip title="This is a button">
<Button label="button" />
</Tooltip>
</ThemeProvider>
);

const UIWrapper = ({ children }: { children: ReactNode }) => (
<Stack
sx={{
Expand Down

0 comments on commit 5f7698d

Please sign in to comment.