Skip to content

Commit b0517dd

Browse files
committed
fix(hourglass): accept style prop
1 parent 107fe15 commit b0517dd

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/Hourglass/Hourglass.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default {
1515
} as ComponentMeta<typeof Hourglass>;
1616

1717
export function Default() {
18-
return <Hourglass size={32} />;
18+
return <Hourglass size={32} style={{ margin: 20 }} />;
1919
}
2020

2121
Default.story = {

src/Hourglass/Hourglass.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import React, { forwardRef } from 'react';
22
import styled from 'styled-components';
33
import { getSize } from '../common/utils';
4+
import { CommonStyledProps } from '../types';
45
import base64hourglass from './base64hourglass';
56

67
type HourglassProps = {
78
size?: string | number;
8-
};
9+
} & React.HTMLAttributes<HTMLDivElement> &
10+
CommonStyledProps;
911

10-
const StyledContainer = styled.span<Required<Pick<HourglassProps, 'size'>>>`
12+
const StyledContainer = styled.div<Required<Pick<HourglassProps, 'size'>>>`
1113
display: inline-block;
1214
height: ${({ size }) => getSize(size)};
1315
width: ${({ size }) => getSize(size)};

0 commit comments

Comments
 (0)