New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@saunos/restyle-mantine

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@saunos/restyle-mantine

`@saunos/restyle-mantine` is a library that provides jsx transform to expose `css` prop from [Restyle](https://github.com/souporserious/restyle) for [Mantine](https://github.com/mantinedev/mantine) components.

unpublished
latest
npmnpm
Version
1.0.0
Version published
Maintainers
0
Created
Source

@saunos/restyle-mantine

@saunos/restyle-mantine is a library that provides jsx transform to expose css prop from Restyle for Mantine components.

Features

  • 🎨 Use ReStyle's css prop with Mantine components
  • 🚀 Add Mantine theme as a css prop parameter

Installation

npm install @saunos/restyle-mantine restyle @mantine/core

Setup

  • Update your tsconfig.json to use the custom JSX transform:
{
  "compilerOptions": {
    "jsx": "react-jsx",
    "jsxImportSource": "@saunos/restyle-mantine"
  }
}
  • If you prefer per-file configuration, add this comment at the top of your .tsx files:
/** @jsxImportSource @saunos/restyle-mantine */

Usage

Here's a basic example of how to use @saunos/restyle-mantine:

import React from 'react';
import { Button, Text } from '@mantine/core';

function App() {
  return (
    <div>
      <Button
        css={(theme) => ({
          backgroundColor: theme.colors.primary,
          marginBottom: theme.spacing.m,
        })}
      >
        Styled Button
      </Button>
      <Text
        css={{
          fontSize: 18,
        }}
      >
        Styled Text
      </Text>
    </div>
  );
}

API Reference

css prop

Please refer to Restyle's docs for more details.

css with callback function

theme: MantineTheme is passed as an argument to the callback function.

<Button
  css={(theme) => ({
    backgroundColor: theme.colors.primary,
    padding: theme.spacing.m,
  })}
>
  Click me
</Button>

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License.

FAQs

Package last updated on 06 Oct 2024

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