-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #947 from ooni/tailwind
Replace styled-components with tailwind, upgrade ooni-components, format code with biome
- Loading branch information
Showing
424 changed files
with
9,721 additions
and
12,514 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.6.1/schema.json", | ||
"organizeImports": { | ||
"enabled": true | ||
}, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": true | ||
} | ||
}, | ||
"formatter": { | ||
"indentStyle": "space", | ||
"indentWidth": 2 | ||
}, | ||
"javascript": { | ||
"formatter": { | ||
"semicolons": "asNeeded", | ||
"quoteStyle": "single" | ||
} | ||
}, | ||
"files": { | ||
"ignore": [".next/", "scripts/", "public/"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,8 @@ | ||
import styled from 'styled-components' | ||
import { Box } from 'ooni-components' | ||
const BlockText = ({ className, ...props }) => ( | ||
<div | ||
className={`bg-gray-50 border-s-[10px] text-base border-blue-500 p-3 font-base ${className}`} | ||
{...props} | ||
/> | ||
) | ||
|
||
const BlockText = styled(Box)` | ||
background-color: ${props => props.theme.colors.gray0}; | ||
border-left: 10px solid ${props => props.theme.colors.blue5}; | ||
` | ||
|
||
BlockText.defaultProps = { | ||
p: 3, | ||
fontSize: 1, | ||
} | ||
|
||
export default BlockText | ||
export default BlockText |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,5 @@ | ||
import { ImSpinner8 } from 'react-icons/im' | ||
import { keyframes, styled } from 'styled-components' | ||
|
||
const spin = keyframes` | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
` | ||
|
||
const StyledSpinner = styled(ImSpinner8)` | ||
animation: ${spin} 1s linear infinite; | ||
` | ||
|
||
const ButtonSpinner = () => <StyledSpinner /> | ||
const ButtonSpinner = () => <ImSpinner8 className="animate-spin" /> | ||
|
||
export default ButtonSpinner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,20 @@ | ||
import NLink from 'next/link' | ||
import { Box, Button, Flex, Heading, Text } from 'ooni-components' | ||
import Link from 'next/link' | ||
import { FormattedMessage } from 'react-intl' | ||
|
||
const CallToActionBox = ({title, text}) => { | ||
const CallToActionBox = ({ title, text }) => { | ||
return ( | ||
<Flex p={3} bg='gray3' flexWrap='wrap' minHeight='180px'> | ||
<Box mb={2}> | ||
<Heading h={4} m={0}> | ||
{title} | ||
</Heading> | ||
<Text fontSize={1}> | ||
{text} | ||
</Text> | ||
</Box> | ||
<NLink href='https://ooni.org/install'> | ||
<Button> | ||
<FormattedMessage id='Country.Overview.NoData.Button.InstallProbe' /> | ||
</Button> | ||
</NLink> | ||
</Flex> | ||
<div className="flex p-4 bg-gray-300 flex-wrap min-h-[180px]"> | ||
<div className="mb-2"> | ||
<h4>{title}</h4> | ||
<div className="text-xl">{text}</div> | ||
</div> | ||
<Link href="https://ooni.org/install"> | ||
<button type="button" className="btn btn-primary"> | ||
<FormattedMessage id="Country.Overview.NoData.Button.InstallProbe" /> | ||
</button> | ||
</Link> | ||
</div> | ||
) | ||
} | ||
|
||
export default CallToActionBox | ||
export default CallToActionBox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.