Giter Club home page Giter Club logo

Comments (10)

gridchin avatar gridchin commented on June 3, 2024 17

import 'focus-visible'; also works.

from focus-visible.

MattSidor avatar MattSidor commented on June 3, 2024 11

Ah okay, so the solution is to point directly to the file in the dist folder instead of just naming the package. Also, we have to make sure to import the library in App.js before any other libraries (e.g. React, ReactDOM) are loaded.

import "focus-visible/dist/focus-visible.js";
import React, { Component } from "react";
...

from focus-visible.

santos22 avatar santos22 commented on June 3, 2024 1

Hey @robdodson

Sure did, thanks! I will try to use the following as a reference: https://github.com/TheFullResolution/temperature-graph

from focus-visible.

santos22 avatar santos22 commented on June 3, 2024 1

Hey @MattSidor,

I actually wasn't able to but I did manage to see how others were doing so by searching on GitHub. Check this repo out, hope it helps! https://github.com/TheFullResolution/temperature-graph

from focus-visible.

MattSidor avatar MattSidor commented on June 3, 2024 1

Sorry @santos22, I'm still confused. I see a library there for making a temperature graph with React, but I don't see how it's relevant to this question.

from focus-visible.

robdodson avatar robdodson commented on June 3, 2024

Hey @santos22

Because this is a CSS polyfill there aren't any functions to access. I'd recommend just including the focus-visible script in your bundle (maybe even just using a script tag for it?). After that you should be able to leverage the .focus-visible class.

from focus-visible.

robdodson avatar robdodson commented on June 3, 2024

@santos22 did my response help at all?

from focus-visible.

robdodson avatar robdodson commented on June 3, 2024

cool, glad you got it sorted.

from focus-visible.

MattSidor avatar MattSidor commented on June 3, 2024

@santos22 Can you elaborate on how you imported this library into your React app?

from focus-visible.

santos22 avatar santos22 commented on June 3, 2024

Hey @MattSidor,

Check out - https://github.com/TheFullResolution/temperature-graph/blob/master/src/index.js#L3

from focus-visible.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.