mirror of
https://github.com/outline/outline.git
synced 2026-11-21 13:34:02 +03:00
12 lines
282 B
TypeScript
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);
|
|
}
|