Browse Source

react-landing/src: added pageWidth prop

pull/3/head
remorses 1 year ago
parent
commit
9403da3f8a
2 changed files with 15 additions and 2 deletions
  1. +10
    -2
      react-landing/src/LandingProvider.tsx
  2. +5
    -0
      react-landing/src/layout.tsx

+ 10
- 2
react-landing/src/LandingProvider.tsx View File

@ -1,4 +1,10 @@
import { ColorModeProvider, CSSReset, DefaultTheme, FlexProps, Stack } from '@chakra-ui/core'
import {
ColorModeProvider,
CSSReset,
DefaultTheme,
FlexProps,
Stack,
} from '@chakra-ui/core'
import React from 'react'
import { PropagatedThemeProvider } from './layout'
@ -16,6 +22,7 @@ export type LandingProviderProps = {
dark?: boolean
primary?: string
secondary?: string
pageWidth?: string
children?: any
} & FlexProps
@ -35,6 +42,7 @@ export function LandingProvider({
dark = false,
primary = 'purple',
secondary = 'purple',
pageWidth = '1200px',
children,
...rest
}: LandingProviderProps) {
@ -44,7 +52,7 @@ export function LandingProvider({
secondary,
},
sizes: {
pageContainer: '1200px',
pageContainer: pageWidth,
},
}
return (

+ 5
- 0
react-landing/src/layout.tsx View File

@ -54,6 +54,7 @@ export type PageContainerProps = {
floatingElement?: any
dark?: boolean
primary?: string
pageWidth?: string
} & StackProps
export const PageContainer: FC<PageContainerProps> = forwardRef(
@ -64,6 +65,7 @@ export const PageContainer: FC = forwardRef(
floatingElement = null,
dark = false,
primary = undefined,
pageWidth = undefined,
...props
},
ref,
@ -74,6 +76,9 @@ export const PageContainer: FC = forwardRef(
colors: {
primary,
},
sizes: {
pageContainer: pageWidth,
},
}
return (
<Col

Loading…
Cancel
Save