react-laravel-paginex icon indicating copy to clipboard operation
react-laravel-paginex copied to clipboard

Tailwind

Open xx1196 opened this issue 3 years ago • 1 comments

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

xx1196 avatar Apr 10 '21 14:04 xx1196

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 */
}

JPrisk avatar Aug 27 '21 21:08 JPrisk