Socket
Socket
Sign inDemoInstall

aesthetic-react

Package Overview
Dependencies
19
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    aesthetic-react

React hooks, composers, and more for styling components with Aesthetic.


Version published
Weekly downloads
148
increased by108.45%
Maintainers
1
Install size
1.59 MB
Created
Weekly downloads
 

Readme

Source

Aesthetic via React

Build Status npm version npm deps

Style React components with hooks or HOCs, using the powerful Aesthetic library.

import React from 'react';
import { useStyles } from 'aesthetic-react';

export type Props = {
  children: React.ReactNode;
};

export default function Button({ children }: Props) {
  const [styles, cx] = useStyles(({ unit }) => ({
    button: {
      textAlign: 'center',
      display: 'inline-block',
      padding: unit,
    },
  }));

  return (
    <button type="button" className={cx(styles.button)}>
      {children}
    </button>
  );
}

Requirements

  • React 16.6+

Installation

yarn add aesthetic aesthetic-react react
// Or
npm install aesthetic aesthetic-react react

Documentation

https://milesj.gitbook.io/aesthetic/integrations/react

Keywords

FAQs

Last updated on 07 Apr 2020

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc