Skip to content

Commit

Permalink
fix(hourglass): accept style prop
Browse files Browse the repository at this point in the history
  • Loading branch information
arturbien committed Oct 28, 2022
1 parent 107fe15 commit b0517dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Hourglass/Hourglass.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default {
} as ComponentMeta<typeof Hourglass>;

export function Default() {
return <Hourglass size={32} />;
return <Hourglass size={32} style={{ margin: 20 }} />;
}

Default.story = {
Expand Down
6 changes: 4 additions & 2 deletions src/Hourglass/Hourglass.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import React, { forwardRef } from 'react';
import styled from 'styled-components';
import { getSize } from '../common/utils';
import { CommonStyledProps } from '../types';
import base64hourglass from './base64hourglass';

type HourglassProps = {
size?: string | number;
};
} & React.HTMLAttributes<HTMLDivElement> &
CommonStyledProps;

const StyledContainer = styled.span<Required<Pick<HourglassProps, 'size'>>>`
const StyledContainer = styled.div<Required<Pick<HourglassProps, 'size'>>>`
display: inline-block;
height: ${({ size }) => getSize(size)};
width: ${({ size }) => getSize(size)};
Expand Down

0 comments on commit b0517dd

Please sign in to comment.