revite/src/components/ui/Tip.tsx

37 lines
776 B
TypeScript
Raw Normal View History

2021-06-18 09:20:57 -04:00
import styled from "styled-components";
import { Info } from "@styled-icons/feather";
import { Children } from "../../types/Preact";
export const TipBase = styled.div`
2021-06-18 10:57:08 -04:00
display: flex;
2021-06-18 09:20:57 -04:00
padding: 12px;
overflow: hidden;
align-items: center;
font-size: 14px;
border-radius: 7px;
background: var(--primary-header);
border: 2px solid var(--secondary-header);
a {
cursor: pointer;
&:hover {
text-decoration: underline;
}
}
2021-06-18 10:57:08 -04:00
2021-06-18 09:20:57 -04:00
svg {
flex-shrink: 0;
margin-right: 10px;
}
`;
2021-06-18 10:18:10 -04:00
export default function Tip(props: { children: Children }) {
2021-06-18 09:20:57 -04:00
return (
<TipBase>
<Info size={20} strokeWidth={2} />
2021-06-18 10:57:08 -04:00
<span>{props.children}</span>
2021-06-18 09:20:57 -04:00
</TipBase>
2021-06-18 10:57:08 -04:00
);
2021-06-18 09:20:57 -04:00
}