This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
outline/frontend/components/Icon/Icon.js

27 lines
447 B
JavaScript

// @flow
import React from 'react';
import styled from 'styled-components';
export type Props = {
className?: string,
light?: boolean,
};
type BaseProps = {
children?: React$Element<any>,
};
export default function Icon({ children, ...rest }: Props & BaseProps) {
return (
<Wrapper {...rest}>
{children}
</Wrapper>
);
}
const Wrapper = styled.span`
svg {
fill: ${props => (props.light ? '#fff' : '#000')};
}
`;