Rocketact

Rocketact

  • Docs
  • GitHub

›Development

Getting Started

  • Getting Started
  • Folder Structure
  • Available Scripts
  • Supported Browsers and Features
  • Custom Templates

Development

  • Managing Dependencies
  • Adding Pages
  • Adding Stylesheets
  • Post-Processing CSS
  • Adding Images
  • Http proxy

Deployment

  • Public Path

Plugins

  • What is the plugin?
  • rocketact-plugin-polyfill
  • rocketact-plugin-bundle-analyzer
  • Plugin template
  • Awesome Plugins
Edit

Adding Stylesheets

We use Webpack for bundling all assets used in the project. You can tell Webpack to compile a specific CSS file by importing that CSS file in your React component.

Button.tsx

import React from 'react';
import './Button.css'

export default class Button extends React.Component {
  render <div className="button" />
}

Button.css

.button {
  padding: 20px;
}

Want to use Sass?

No problem! The project has Sass preprocessor configured out of the box. All you need is to rename Button.css to Button.scss and update the import statement in you React component.

Last updated on 3/3/2019 by loveky
← Adding PagesPost-Processing CSS →
  • Want to use Sass?
Rocketact
Docs
Getting Started
Community
User ShowcaseIssues
More
GitHubStar
Copyright © 2018-present Rocketact documentation authors.