Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tailwind #12

Open
xx1196 opened this issue Apr 10, 2021 · 1 comment
Open

Tailwind #12

xx1196 opened this issue Apr 10, 2021 · 1 comment

Comments

@xx1196
Copy link

xx1196 commented Apr 10, 2021

Hi im using this component, works awesome, but how add class for tailwindcss? im amateur in react

@JPrisk
Copy link

JPrisk commented Aug 27, 2021

if you are using css-in-js via twin.macro you can do something like this:

import tw, { css, styled } from 'twin.macro';

const StyledPagination = styled.nav(() => [
  css`
    .pagination {
    /* your styles here */
    }
<StyledPagination aria-label="Pagination">
  <LaravelPagination data={data} options={paginationOptions}/>
</StyledPagination>

otherwise if you are using Tailwind (following their docs) you will need to include a style sheet with your applied styles i.e.

// in your index.js
import pagination-styles.css;

and

/* pagination-styles.css */

.pagination {
  @apply /* tailwind classes here */
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants