Files
outline/app/editor/components/WithTheme.tsx
2022-01-19 18:43:15 -08:00

12 lines
282 B
TypeScript

import * as React from "react";
import { DefaultTheme, useTheme } from "styled-components";
type Props = {
children: (theme: DefaultTheme) => React.ReactElement;
};
export default function WithTheme({ children }: Props) {
const theme = useTheme();
return children(theme);
}