diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-06-13 05:49:42 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-06-13 05:49:42 +0800 |
commit | ca41f100ab9187b32b61ef83f8affed5ae3670b8 (patch) | |
tree | eef635ab79fa68a0d489ead9e3f6b2aa6d9a74f5 /packages/website/ts/components | |
parent | 084285a76002bc1659797ee9a1aabc5bfae9e7d2 (diff) | |
download | dexon-sol-tools-ca41f100ab9187b32b61ef83f8affed5ae3670b8.tar dexon-sol-tools-ca41f100ab9187b32b61ef83f8affed5ae3670b8.tar.gz dexon-sol-tools-ca41f100ab9187b32b61ef83f8affed5ae3670b8.tar.bz2 dexon-sol-tools-ca41f100ab9187b32b61ef83f8affed5ae3670b8.tar.lz dexon-sol-tools-ca41f100ab9187b32b61ef83f8affed5ae3670b8.tar.xz dexon-sol-tools-ca41f100ab9187b32b61ef83f8affed5ae3670b8.tar.zst dexon-sol-tools-ca41f100ab9187b32b61ef83f8affed5ae3670b8.zip |
Move FilledImage into components/ui
Diffstat (limited to 'packages/website/ts/components')
-rw-r--r-- | packages/website/ts/components/ui/filled_image.tsx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/packages/website/ts/components/ui/filled_image.tsx b/packages/website/ts/components/ui/filled_image.tsx new file mode 100644 index 000000000..7f58ee5b9 --- /dev/null +++ b/packages/website/ts/components/ui/filled_image.tsx @@ -0,0 +1,18 @@ +import * as React from 'react'; + +export interface FilledImageProps { + src: string; +} +export const FilledImage = (props: FilledImageProps) => ( + <div + style={{ + width: '100%', + height: '100%', + objectFit: 'cover', + backgroundImage: `url(${props.src})`, + backgroundRepeat: 'no-repeat', + backgroundPosition: 'center', + backgroundSize: 'cover', + }} + /> +); |