aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Carlsen <fred@sjelfull.no>2018-12-10 21:26:44 +0800
committerFred Carlsen <fred@sjelfull.no>2018-12-10 21:49:12 +0800
commitc4ee6836faad0819d35bbdc95a2a65f261e0fe65 (patch)
tree8bd9c6c1df0c23a7684f1381cca34ebd89ce7303
parent55ed406746e3a1bd5cca6010e438b8f2a3550a3c (diff)
downloaddexon-sol-tools-c4ee6836faad0819d35bbdc95a2a65f261e0fe65.tar
dexon-sol-tools-c4ee6836faad0819d35bbdc95a2a65f261e0fe65.tar.gz
dexon-sol-tools-c4ee6836faad0819d35bbdc95a2a65f261e0fe65.tar.bz2
dexon-sol-tools-c4ee6836faad0819d35bbdc95a2a65f261e0fe65.tar.lz
dexon-sol-tools-c4ee6836faad0819d35bbdc95a2a65f261e0fe65.tar.xz
dexon-sol-tools-c4ee6836faad0819d35bbdc95a2a65f261e0fe65.tar.zst
dexon-sol-tools-c4ee6836faad0819d35bbdc95a2a65f261e0fe65.zip
Correct icon interface
-rw-r--r--packages/website/ts/@next/components/icon.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/website/ts/@next/components/icon.tsx b/packages/website/ts/@next/components/icon.tsx
index 07a882246..bc0f6f47e 100644
--- a/packages/website/ts/@next/components/icon.tsx
+++ b/packages/website/ts/@next/components/icon.tsx
@@ -8,7 +8,7 @@ interface IconProps extends PaddingInterface {
size?: 'small' | 'medium' | 'large' | number;
}
-export const Icon: React.FunctionComponent<Props> = (props: Props) => {
+export const Icon: React.FunctionComponent<IconProps> = (props: IconProps) => {
const IconSVG = Loadable({
loader: () => import(/* webpackChunkName: "icon" */`ts/@next/icons/illustrations/${props.name}.svg`),
loading: () => 'Loading',
@@ -21,7 +21,7 @@ export const Icon: React.FunctionComponent<Props> = (props: Props) => {
);
};
-export const InlineIconWrap = styled.div`
+export const InlineIconWrap = styled.div<IconProps>`
margin: ${props => getCSSPadding(props.margin)};
display: flex;
align-items: center;
@@ -40,7 +40,7 @@ const _getSize = (size: string | number = 'small'): string => {
return `${size}px`;
};
-const StyledIcon = styled.figure`
+const StyledIcon = styled.figure<IconProps>`
width: ${props => _getSize(props.size)};
height: ${props => _getSize(props.size)};
margin: ${props => getCSSPadding(props.margin)};