Skip to content

Migrate to chakra #73

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 49 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
1242b99
added charka-ui package
a-saran Jun 1, 2020
f908c5d
changed theme
a-saran Jun 1, 2020
8f1e601
added navbar component
a-saran Jun 1, 2020
3daf176
changed header and layout structure
a-saran Jun 1, 2020
cc15996
fixed font sizes in theme
a-saran Jun 1, 2020
dbe387c
added lineHeights to theme
a-saran Jun 1, 2020
dff7c0e
converted global css to object
a-saran Jun 1, 2020
fae2c5f
changed font size theme structure
a-saran Jun 2, 2020
c2e4ccc
migrated footer component
a-saran Jun 2, 2020
ea6d644
migrated contact form component
a-saran Jun 2, 2020
d4960e4
migrated to chakra-ui
a-saran Jun 2, 2020
b092ba4
added button component
a-saran Jun 2, 2020
d60b479
added react icon
a-saran Jun 2, 2020
5c4c9df
migrated to chakra-ui
a-saran Jun 2, 2020
d00257e
completed index page
a-saran Jun 2, 2020
b1957ee
removed bricks
a-saran Jun 2, 2020
6f4fda4
added global styles
a-saran Jun 2, 2020
a1d7240
removed padding for logo
a-saran Jun 2, 2020
2a3d571
migrated careers and open-source page
a-saran Jun 2, 2020
1bb81f9
migrated process, solutions, work pages
a-saran Jun 2, 2020
8d1592c
removed bricks
a-saran Jun 3, 2020
463b9ed
removed console.log
a-saran Jun 3, 2020
9a85570
removed styled-system and bricks packages
a-saran Jun 3, 2020
fe347a4
added hover link to nav
a-saran Jun 3, 2020
9a10ac5
added mobile navbar
a-saran Jun 3, 2020
c04de38
changed layout margin
a-saran Jun 3, 2020
8a32eb6
warning fixes
a-saran Jun 3, 2020
ae95afe
added code font-size
a-saran Jun 3, 2020
e486ccf
changed global padding style
a-saran Jun 5, 2020
56057f2
added a doc
sanandnarayan Jun 8, 2020
fbec05f
added typography components
a-saran Jun 9, 2020
7da7232
changed home page components
a-saran Jun 9, 2020
7bd89aa
changes based on typography
a-saran Jun 9, 2020
1a7b1c6
changed footer components
a-saran Jun 9, 2020
b2ac35b
changed typography components
a-saran Jun 9, 2020
fa4e4b7
added mdx provider and components
a-saran Jun 9, 2020
0136638
added strong component and margin fix - post-layout
a-saran Jun 9, 2020
c8fff80
import fixes
a-saran Jun 9, 2020
ac0bc17
mdx fix
a-saran Jun 10, 2020
7864bb3
updated gatsby-offline package
a-saran Jun 10, 2020
7cc6b4e
removed mdx provider
a-saran Jun 10, 2020
658f95a
revoked mdx provider
a-saran Jun 10, 2020
87eb76a
removed yarn lock file
a-saran Jun 10, 2020
0f1fbbc
added component docz
a-saran Jun 10, 2020
741d94c
added button docz
a-saran Jun 10, 2020
9ac831f
deleted image component-unwanted
a-saran Jun 10, 2020
1fc40b5
clean up
a-saran Jun 10, 2020
81bd103
removed unwanted as props
a-saran Jun 12, 2020
1d76ae5
form button submission fix
a-saran Jun 12, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/bloglayout.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: bloglayout
---

import { Playground } from 'docz'
import Bloglayout from '../src/templates/blog-post-layout'
import Bloglayout from '../src/templates/blog-post-layout.js'

<Playground>
<Bloglayout/>
Expand Down
24 changes: 24 additions & 0 deletions docs/button.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Button
---

import { Playground } from 'docz'
import {Box} from '@chakra-ui/core'
import Button from '../src/components/button.js'
import ContactUsButton from '../src/components/contactUsButton.js'

## Button
<Playground>
<Button>hi</Button>
</Playground>

## Contact us Button
<Playground>
<ContactUsButton />
</Playground>

### Props
| Props | default |
|:-------|:------|
| text | Contact Us|

114 changes: 19 additions & 95 deletions docs/config/theme.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
import { theme } from "@chakra-ui/core"

const maxContainerWidth = '70rem'
const baseLineHeight = 1.45; //24.8px
const desktopBaseSize = 1.125; //18px
const mobileBaseSize = 1; //16px
const breakpoints = [
'52em',
'48rem',
]
const scale = [
0.75,1, 1.2, 1.375, 1.6875, 2.5
0.75, 1, 1.2, 1.375, 1.6875, 2.5
];

const fontSizes = scale.map(n=> n*mobileBaseSize + 'rem')
//desktops
fontSizes.desktop = scale.map(n=> n*desktopBaseSize + 'rem')

const fonts = {
Expand All @@ -18,6 +21,13 @@ const fonts = {
bold: 'TiemposBold',
italic: 'TiemposItalic'
}

theme.sizes['maxContainerWidth'] = maxContainerWidth

theme.borders['3px'] = '3px solid'

const radii = [0, 1, 2, 4, 8, 16];

const lineHeights = [
0.5 * baseLineHeight + 'rem',
1 * baseLineHeight + 'rem',
Expand All @@ -26,110 +36,24 @@ const lineHeights = [
2.5 * baseLineHeight + 'rem',
3 * baseLineHeight + 'rem',
];
const space = [0,...lineHeights];

const space = [0, ...lineHeights];

const colors = {
tint: '#F8F4F2',
black: ['#0F0F0F','#333333', '#666666', '#999999'],
black: ['#0F0F0F','#333333', '#666666', '#999999', '#E0E0E0'],
}
colors.primary = colors.black[1]
colors.secondary = colors.tint

const styles = {
body:{
fontFamily: 'body',
fontSize: [1, 'desktop.1'],
lineHeight: 1,
},
h1: {
fontFamily: 'heading',
fontSize: [5, 'desktop.5'],
lineHeight: 3,
marginTop: [3, 4],
marginBottom: 1,
padding: 0,
},
h2: {
fontFamily: 'heading',
fontSize: [4, 'desktop.4'],
lineHeight: 2,
marginTop: [3, 4],
marginBottom: 1,
padding: 0,
},
h3: {
fontFamily: 'heading',
fontSize: [3, 'desktop.3'],
lineHeight: 1,
marginTop: [ 2,3 ],
marginBottom: 1,
padding: 0,
},
h4: {
fontFamily: 'heading',
fontSize: [2, 'desktop.2'],
lineHeight: 1,
marginTop: 2,
marginBottom: 1,
padding: 0,
},
h5: {
fontFamily: 'heading',
fontSize: [1, 'desktop.1'],
lineHeight: 1,
marginTop: 2,
marginBottom: 1,
padding: 0,
},
p: {
fontFamily: 'body',
fontSize: [1, 'desktop.1'],
lineHeight: 1,
maxWidth: '40rem',
marginBottom: [2,2]
},
b: {
fontFamily: 'bold',
},
strong: {
fontFamily: 'bold'
},
em: {
fontFamily: 'italic'
},
i: {
fontFamily: 'italic',
},
Container: {
maxWidth: '71.5rem',
padding: 0,
px: ['0.725rem']
},
ul: {
listStyle: 'disc inside none' ,
mb: [2,2]
},
ol: {
listStyle: 'decimal inside none',
},
li: {
mb: ['0.5rem','0.5rem'],
fontFamily: 'body',
fontSize: [1, 'desktop.1'],
lineHeight: 1,
maxWidth: '40rem',
marginBottom: [1,1]
}
}

const theme = {
const customTheme = {
...theme,
breakpoints,
space,
fontSizes,
radii,
lineHeights,
maxContainerWidth,
fonts,
colors,
styles,
}
export default theme;
export default customTheme;
2 changes: 1 addition & 1 deletion docs/config/wrapper.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { ThemeProvider } from 'bricks'
import { ThemeProvider } from '@chakra-ui/core'
import theme from './theme'

global.__PATH_PREFIX__ = ''
Expand Down
12 changes: 12 additions & 0 deletions docs/contact-form.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: Contact-form
---

import { Playground } from 'docz'
import ContactForm from '../src/components/contactForm.js'

## Contact-form

<Playground>
<ContactForm />
</Playground>
12 changes: 12 additions & 0 deletions docs/developmentServices.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: Development-services
---

import { Playground } from 'docz'
import DevelopmentServices from '../src/components/developmentServices.js'

## Development-services

<Playground>
<DevelopmentServices />
</Playground>
18 changes: 18 additions & 0 deletions docs/icons.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Icons
---

import { Playground } from 'docz'
import ReactIcon from '../src/components/icons/React.js'

## React Icon
<Playground>
<ReactIcon width='200px'/>
</Playground>

### Props

| Props | Description |
|:-------|:------|
| width | Sets the width of the icon |
| Height | Sets the Height of the icon |
12 changes: 12 additions & 0 deletions docs/libraries.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: Libraries
---

import { Playground } from 'docz'
import Libraries from '../src/components/libraries.js'

## Libraries

<Playground>
<Libraries />
</Playground>
4 changes: 2 additions & 2 deletions docs/link.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import {Playground} from 'docz'

## PlainLink
<Playground>
<PlainLink to='/docz-pagination'>
<PlainLink to=''>
Pagination
</PlainLink>
</Playground>

## CategoryLink
<Playground>
<CategoryLink to='/docz-pagination'>
<CategoryLink to=''>
Category
</CategoryLink>
</Playground>
Loading