NASA Proceeds to Mars

    react-styled-reboot

    1.0.0 • Public • Published

    react-styled-reboot

    react-styled-reboot is a css reset that is based on reboot and it is specifically made for apps that use styled-components in their development process because it integrates nicely with the injectGlobal function that styled-components provides!

    Installation

    npm:npm install --save react-styled-reboot

    yarn: yarn add react-styled-reboot

    pnpm: pnpm install --save react-styled-reboot

    Usage

    Firstly you would need to import the injectGlobal function from styled-components and also import react-styled-reboot

    import { injectGlobal } from 'styled-components';
    import StyledReboot from 'react-styled-reboot';
    

    Then all you have to do is call the injectGlobal and inside it run the StyledReboot function!

    import React from 'react';
    import { render } from 'react-dom';
    import { injectGlobal } from 'styled-components';
    import StyledReboot from 'react-styled-reboot';
    import App from './App';
    
    injectGlobal`
        ${StyledReboot()}
    `;
    
    render(
        <App />,
        document.getElementById('root')
    );
    
    

    This is an example of what would be the index.js file if you are using create-react-app

    License

    MIT License

    Copyright (c) 2018 Ahmed Tarek

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

    Keywords

    none

    Install

    npm i react-styled-reboot

    DownloadsWeekly Downloads

    6

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    22.6 kB

    Total Files

    6

    Last publish

    Collaborators

    • ahmedtarek2134