New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@deloitte-digital-au/rhythm-form-react

Package Overview
Dependencies
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@deloitte-digital-au/rhythm-form-react

Form component library for React projects.

  • 0.1.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

Rhythm UI

rhythm-form-react

Form components for Rhythm UI.

Installation

For the moment the library can be installed directly from the repository:

npm install @deloitte-digital-au/rhythm-form-react

Usage

Using a component

To use a component, just import it:

import Text from '@deloitte-digital-au/rhythm-form-react/lib/controls/Text';

Refer to the component's doc page for a guide to using a specific component.

Using a component's sass file

Each component also has a sass file that you can import and use however you like.

To import, just add /style to end the component's import path.

@import "@deloitte-digital-au/rhythm-form-react/lib/controls/Text/style";

The sass files use a set of default variables which you can customise.

For now, look at src/utils/defaults.scss for the list of variables.

Using CSS modules

If you're using CSS modules in your app, you can still use them here with a bit of effort.

This approach was inspired by the awesome reactstrap.

Each component can take a cssModule prop, which expects a CSS module object. You can use this prop to create a new component with your styles baked in.

You can structure this any way you like, but as an example, in your project:

import Text from '@deloitte-digital-au/rhythm-form-react/lib/controls/Text';

// This could be any css file you want
import textStyles from 'my/text/styles';

export default (props) => <Text cssModules={textStyles} {...props} />

// Now you can use that component elsewhere
import Text from '../forms/styled/Text';

It's important to note that the components inside the component won't be passed the CSS module. This means that things like the won't be styled.

You will need to individually hook up each component from this library with it's own CSS module

Keywords

FAQs

Package last updated on 06 Dec 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc