Questions tagged [class-names]

86 questions
1
vote
2 answers

Why does `class-name` does not work in the REPL for this case?

I am reading the book Object Oriented Programming in Common Lisp from Sonja Keene. In chapter 7, the author presents: (class-name class-object) This would make possible to query a class object for its name. Using SBCL and the SLIME's REPL, I…
Pedro Delfino
  • 2,421
  • 1
  • 15
  • 30
1
vote
1 answer

How to type check if object keys conform a conditional recursive template type?

The question is easy to understand with an example. I'd want to achieve a strictly type guarded wrapper for https://npmjs.com/package/classnames, to type check the Tailwind class names that our app uses. So far the closest solution is this…
Kimmo
  • 1,886
  • 1
  • 21
  • 28
1
vote
1 answer

How do I use the npm classnames library in next.js to optionally apply styles from a css file?

In the html below, I am optionally applying the bootstrap classes, alert-danger or alert-primary depending on message.error or message.info. The target classes are bootstrap classes and it works as expected.
koque
  • 1,830
  • 5
  • 28
  • 49
1
vote
1 answer

Multiple Ui_Dialog definitions due to multiple *.ui files?

I'm working on a RaspberryPi with a 3.5 inch LCD screen. I have a Qt 5 based application that operates in kiosk mode without a title bar. The app uses the entire 320x480 screen. I am trying to add a second dialog that is displayed when the user…
jww
  • 97,681
  • 90
  • 411
  • 885
1
vote
2 answers

ClassName is not being passed to Objects

Code is below. I'm trying to pass an active state to a slide in a carousel for React. But in the inspector, all I get is class name [object. object] instead of the correct class name. Is there a particular reason why the className is not being…
1
vote
2 answers

Should or Must in Java file name

I'm learning about Java and have just encountered 2 instructions: A class must have a matching filename Remember that the name of the java file should match the class name Ask: Should in (2) LIKE or DIFFERENT Must in (1) ?? -> (1), (2). What is…
Puskin
  • 125
  • 1
  • 11
1
vote
1 answer

TypeScript with classnames: No index signature

I'm writing a React app and I'm using classnames to help with my styling. I join my classnames like this: const appBarClasses = classNames({ [classes.appBar]: true, [classes[color]]: color, [classes.fixed]: fixed }); In the line where I set…
J. Hesters
  • 13,117
  • 31
  • 133
  • 249
1
vote
4 answers

How to change class name of an element that doesn't have an id?

  • Smokey
  • Teddy
how do I change those class names here? I tried; document.querySelectorAll('li').className = "corgitype" and document.querySelectorAll('li').classList = "corgitype" but…
gunacan
  • 21
  • 6
1
vote
2 answers

Set class dynamically using classNames module not working

thanks in advance for taking a look at this. I am attempting to set the class on page load of my element to pending, and then onClick, remove the pending class and add the completed class: Currently, the state of completed and pending change…
sivs
  • 677
  • 1
  • 5
  • 11
1
vote
0 answers

menuIcon is not defined in react app when loading scss file

I have an app using an import statement to load scss file. it builds fine but when loading in browser it errors VM148 transformed.js:19714 Uncaught ReferenceError: menuIcon is not defined at Sidebar.render (VM148 transformed.js:19714) …
shorif2000
  • 2,582
  • 12
  • 65
  • 137
1
vote
2 answers

How to check if all class names of divs in the DOM have a specific string with vanilla Javascript?

I have the following markup:
How can I check if a div in the DOM has a class name that contains the text hidden? The desired output would be…
Ralph David Abernathy
  • 5,230
  • 11
  • 51
  • 78
1
vote
1 answer

Working with css classnames and react-virtualized or react-select

So i'm trying to integrate both of this modules into my project and i have difficulties in dealing with its CSS part. My project is using postcss to turn my own css files into "compiled" css files with added classnames to each of them. Both…
1
vote
1 answer

Regex for replacing class names throughout codebase in Atom Editor

I've been struggling with this for the last few days. I apologize if this is a duplicate, I wasn't able to find what I needed when searching for this particular question. I have class names like the following: class="block underline…
souporserious
  • 2,079
  • 2
  • 27
  • 47
1
vote
0 answers

Braintree PHP SDK class names confusions

I have started using Braintree php sdk by requiring it via composer. It is working fine. It has classes like: Braintree_Configuration, Braintree_ClientToken etc. However, I was looking into the source code in vendor/braintree and I could not find…
Mubashar Abbas
  • 5,536
  • 4
  • 38
  • 49
1
vote
1 answer

Locating elements without a specific class name

This is in the same vein as this question I asked before - Watir webdriver; counting elements with changing class names. I was able to add the specific number of elements based on using the class name asset-card selectable. Currently, I am looking…
kmancusi
  • 591
  • 3
  • 20