themesberg / flowbite-react

Official React components built for Flowbite and Tailwind CSS
https://flowbite-react.com
MIT License
1.77k stars 395 forks source link

Text from date picker coverd by icon? Missing styling #1385

Closed dlopesa closed 1 month ago

dlopesa commented 1 month ago

Steps to reproduce

Just used the component straight from the library Tried to clean my app.js I also tried to take all css applied to inspect element but still looks like the screen shot


import React from "react";
import { Datepicker } from "flowbite-react";
... rest of my code, not relevant for this
  return (

    <div className="trading-tool grid grid-cols-3 grid-rows-[auto_3fr_1fr] gap-2.5 h-screen bg-gray-800 text-white p-2.5">
      {/* Header row for the title and date picker */}
      <div className="col-span-3 flex justify-between items-center p-2.5 text-lg border-b border-gray-600">
        <span>Trading Tool <Datepicker title="Flowbite Datepicker" /> </span>

      </div>

      {/* First row: Three columns */}
      <div className="flex justify-center items-center border border-gray-600">
        <p>[TABLE] Energy Forecast</p>
      </div>
      <div className="flex justify-center items-center border border-gray-600">
        <p>[TABLE] Intraday Flow</p>
      </div>
      <div className="flex flex-col justify-evenly border border-gray-600">
        <p>[LINE GRAPH] tag1 & tag2</p>
        <p>[LINE GRAPH BRUSH] tag1 - tag2</p>
      </div>

      {/* Second row: Two columns, right column divided into three */}
      <div className="flex justify-center items-center col-span-2 border border-gray-600">
        <p>Interacts With</p>
      </div>
      <div className="flex flex-col justify-evenly border border-gray-600">
        <p>[LINE GRAPH] EDS All Forecasts</p>
        <p>[COLUMN GRAPH] Countertrading</p>
      </div>
    </div>
  );

Current behavior

Some part of the date is under the icon? image image

Expected behavior

The date should be after the icon

Context

Regular screen size, not much to say here.

If possible, provide a live example URL, screenshot, video, or a repository with the minimal reproduction of the issue.

Extra:

image Some of the styling (when day is picked) is also not really working

dlopesa commented 1 month ago

FIXED :) For people having the same issue, make sure your taiwlind config has the updated way of importing flow bite. It should look something like:

/** @type {import('tailwindcss').Config} */
const flowbite = require("flowbite-react/tailwind");
module.exports = {
  content: ['./src/**/*.{js,jsx,ts,tsx}', '/node_modules/tailwind-datepicker-react/dist/**/*.js',  './public/index.html', './resources/js/**/*.js',,  './node_modules/flowbite/**/*.js', 'node_modules/flowbite-react/lib/esm/**/*.js', flowbite.content(),],
  darkMode: 'class', // or 'media' or 'class'
  theme: {
    extend: {
      colors: {

      },
    },
  },
  variants: {
    extend: {},
  },
  plugins: [
    flowbite.plugin(),
  ],
};