iari
03/15/2022, 12:11 PMpackage css
// ... imports
val GlobalStyle = CssBuilder().apply {
// my global css goes here
}
and then did
import css.GlobalStyle
in my main components file App.ktturansky
03/15/2022, 2:41 PMGlobal
component can be used for this problemturansky
03/15/2022, 2:41 PMiari
03/16/2022, 8:29 AMsimpleComponent
come from? autocompletion suggests no import.
It appears that kotlin-emotion
is already being depended on by kotlin-react-css
.
Do I have to add another dependencie aside from kotlin-react-css
?
Do I need it or can I just add it in a custom FC<Props>
or FC<GlobalProps>
?
Is the project you screenshotted the code from available somewhere on publically?iari
03/16/2022, 8:39 AMturansky
03/16/2022, 10:26 AMimport csstype.BoxSizing.Companion.borderBox
import csstype.px
import emotion.react.Global
import emotion.react.styles
import react.FC
import react.Props
import react.dom.html.ReactHTML.body
val NormalizeCss = FC<Props> {
Global {
styles {
body {
margin = 0.px
}
"*, *:before, *:after" {
boxSizing = borderBox
}
}
}
}
iari
03/16/2022, 11:06 AM