From 4e6118207e2c8cdff34a157b1350f8c0f251b1ea Mon Sep 17 00:00:00 2001
From: Website Deployment Script A React container component using Docusaurus styles. Has optional padding and background color attributes that you can configure. Padding choices: A React container component using Docusaurus styles. Has optional padding and background color props that you can configure. Padding choices: The Example: A React component to organize text and images. The The The The The The The
-CompLibrary.Container
all
, bottom
, left
, right
, top
.
-Background choices: dark
, highlight
, light
.'all'
, 'bottom'
, 'left'
, 'right'
, 'top'
.
+Background choices: 'dark'
, 'highlight'
, 'light'
.className
prop is an optional prop that allows you to your own class names to the Container
instance. It works like the className
attribute in JSX. You can use this class name to customize the styling of contents within this Container
.<Container padding={["bottom", "top"]} background="light">
+
<Container
+ padding={["bottom", "top"]}
+ background="light"
+ className="myCustomClass">
...
</Container>
CompLibrary.GridBlock
align
attribute determines text alignment. Text alignment defaults to left
and can be set to center
or right
.layout
attribute determines number of column sections per GridBlock. layout
defaults to twoColumn
and can be set to threeColumn
or fourColumn
as well.contents
attribute is an array containing the contents of each section of the GridBlock. Each content object can have the following fields:align
prop determines text alignment. Text alignment defaults to 'left'
and can be set to 'center'
or 'right'
.layout
prop determines number of column sections per GridBlock. layout
defaults to 'twoColumn'
and can be set to 'threeColumn'
or 'fourColumn'
as well.className
prop is an optional prop that allows you to your own class names to the GridBlock
instance. It works like the className
attribute in JSX. You can use this class name to customize the styling of contents within this GridBlock
.contents
prop is an array containing the contents of each section of the GridBlock. Each content object can have the following fields:
content
for the text of this section, which is parsed from markdownimage
for the path to an image to displayimageAlign
field for image alignment relative to the text, which defaults to top
and can be set to bottom
, left
, or right
imageAlign
field for image alignment relative to the text, which defaults to 'top'
and can be set to 'bottom'
, 'left'
, or 'right'
title
for the title to display for this section, which is parsed from markdownimageLink
for a link destination from clicking the imageimageAlt
for the description of what text will be shown in case the image is not availabledark
, highlight
, light
Example:
<GridBlock
align="center"
+ layout="threeColumn"
+ className="myCustomClass"
contents={[
{
content: "Learn how to use this project",
@@ -64,7 +71,6 @@ Background choices: dark
, highlight
, light
"More"
}
]}
- layout="threeColumn"
/>
More examples of how these components are used can be found in the generated example files as well as in Docusaurus' own repo for its website set-up.