mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 05:37:34 +03:00
Added WIP IconButton
component
refs https://github.com/TryGhost/Team/issues/3351
This commit is contained in:
parent
e8d2ff0e98
commit
555ac95c31
@ -0,0 +1,18 @@
|
||||
import type {Meta, StoryObj} from '@storybook/react';
|
||||
|
||||
import IconButton from './IconButton';
|
||||
|
||||
const meta = {
|
||||
title: 'Global / Icon Button',
|
||||
component: IconButton,
|
||||
tags: ['autodocs']
|
||||
} satisfies Meta<typeof IconButton>;
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof IconButton>;
|
||||
|
||||
export const Default: Story = {
|
||||
args: {
|
||||
iconName: 'menu-horizontal'
|
||||
}
|
||||
};
|
17
ghost/admin-x-settings/src/admin-x-ds/global/IconButton.tsx
Normal file
17
ghost/admin-x-settings/src/admin-x-ds/global/IconButton.tsx
Normal file
@ -0,0 +1,17 @@
|
||||
import Icon from './Icon';
|
||||
import React from 'react';
|
||||
|
||||
interface IconButtonProps {
|
||||
iconName: string;
|
||||
}
|
||||
|
||||
const IconButton: React.FC<IconButtonProps> = ({iconName}) => {
|
||||
return (
|
||||
<button aria-expanded="true" aria-haspopup="true" className="flex items-center rounded-sm bg-grey-100 px-2 py-1 text-grey-400 hover:text-grey-600" id="menu-button" type="button">
|
||||
<span className="sr-only">Open menu</span>
|
||||
<Icon color="grey-900" name={iconName} />
|
||||
</button>
|
||||
);
|
||||
};
|
||||
|
||||
export default IconButton;
|
Loading…
Reference in New Issue
Block a user