From 5ff828d9f07f52fa432b036ffeb6c386016ac67c Mon Sep 17 00:00:00 2001 From: Angus Fretwell Date: Sun, 10 Feb 2019 18:33:28 +1100 Subject: [PATCH] [rebass] add ExtendedBox to test, add prop to CustomComponent example --- types/rebass/rebass-tests.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/types/rebass/rebass-tests.tsx b/types/rebass/rebass-tests.tsx index 52e3e7de28..87df64f323 100644 --- a/types/rebass/rebass-tests.tsx +++ b/types/rebass/rebass-tests.tsx @@ -1,10 +1,19 @@ import * as React from "react"; +import styled from "styled-components"; import { Box, Flex, Text, Heading, Button, Link, Image, Card } from "rebass"; const CustomComponent: React.FunctionComponent = ({ children }) => { return
{children}
; }; +const ExtendedBox = styled(Box)` + color: red; +`; + +ExtendedBox.defaultProps = { + p: 3 +}; + () => ( @@ -33,10 +42,13 @@ const CustomComponent: React.FunctionComponent = ({ children }) => { Link - CustomComponent + + CustomComponent + + ExtendedBox );