Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@tlon/indigo-react
Advanced tools
Indigo React is a component library for implementing the Indigo Design System. It's built with React, styled-components and styled-system. It also uses Formik and Reach-UI.
npm install --save @tlon/indigo-react
npm install --save @tlon/indigo-light styled-components styled-system react react-dom @reach/disclosure @reach/menu-button @reach/tabs markdown-to-jsx formik
If you are using Typescript, install the type definitions for several of these libraries.
npm install --save @types/styled-components @types/styled-system @types/styled-system__css
npm install --save @tlon/indigo-light @tlon/indigo-dark
import * as React from "react";
import { ThemeProvider } from "styled-system";
import { Text, Reset } from "@tlon/indigo-react";
import light from "@tlon/indigo-light";
class App extends React.Component {
render() {
return (
<ThemeProvider theme={light}>
<Reset />
<Text fontSize="2">Indigo!</Text>
</ThemeProvider>
);
}
}
In the above, we are wrapping our application in styled-component's ThemeProvider
and passing in our theme
from @tlon/indigo-light
. In practice, you should rarely need to import the theme.
The <Text />
component accepts a fontSize prop, which is one of many style props provided by styled-system
. Using VSCode is the best way to see the list of props each component can accept.
You can also check out the styled-system docs for a breakdown of props.
Many of these props have corrosponding styling shortcuts, drawn from the provided theme, like @tlon/indigo-light
. These shortcuts are also provided by styled-system
. To see how props map to values in our theme, check out styled-system's mapping.
Take a look at the theme to get a sense for which style values can be accessed from styled props.
See DEVELOPMENT.md for example cases of component patterns used to create Indigo.
MIT License © Tlon
FAQs
React implementation of Tlon's design system, Indigo
We found that @tlon/indigo-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.