Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be able to pass in width/height as props #8

Open
KyleAMathews opened this issue Oct 23, 2014 · 10 comments
Open

Be able to pass in width/height as props #8

KyleAMathews opened this issue Oct 23, 2014 · 10 comments

Comments

@KyleAMathews
Copy link
Owner

No description provided.

@taniryo-kun
Copy link

Hi! I just start using this library. I love the spinner design.
Is there a way to change width/height?
I wish to make my spinner more bigger in my project.

@KyleAMathews
Copy link
Owner Author

You can override the width/height with css.

@ghost
Copy link

ghost commented Nov 7, 2016

this is a noob question but i modified height/width with css and nothing changed

@taniryo-kun
Copy link

@KyleAMathews
thx for the reply! And sorry my question was not good.
Because the title of the issue was "pass in as props"(and the issue was closed), I thought there might be a way to override the css value by using some api.
Anyway I done the css override and it works fine, thank you.

@AHStudyBank
i modified the following class. And it worked fine for me. (if you are using other shapes, modify .xxx-wrapper. )
.circle-wrapper { width: 80px; height: 80px; position: relative; }

@ghost
Copy link

ghost commented Nov 7, 2016

do we apply the css styles to the parent container or the object????

Thank you in advance!

@ghost
Copy link

ghost commented Nov 7, 2016

render: function(){
    console.log(this.state.movies);
    if(this.state.movies == ''){
        var movieResults =
  <div className="container">
    <h1 className="noResults">No Current Results</h1>
    <div className="circle-wrapper">
      <Spinner overrideSpinnerClassName="circle-wrapper" spinnerName="circle" />
    </div>
  </div>
    } else {
        var movieResults = <MovieResults movies={this.state.movies} />
    }

    return(
        <div>
            <SearchForm />
            {movieResults}
        </div>
    )
},

@ghost
Copy link

ghost commented Nov 7, 2016

.circle-wrapper {
width: 80px;
height: 80px;
position: relative;
}

.noResults {
color: rgba(172, 0, 15, 0.7);
width: 400px;
height: 100px;
position: relative;
left: 19%;
}

@ghost
Copy link

ghost commented Nov 7, 2016

Weird, I adjusted it by calling div.circle , I did not need to add an override class. Thanks anyways!!!

@arafay993
Copy link

Hi,
Can anybody tell me where to include CSS. I have included spinner as following:

  <Suspense fallback={<Spinner name="pacman" color="steelblue" />}>
    <BrowserRouter basename="/app">
      <App/>
    </BrowserRouter>
  </Suspense>

But the problem is it is loading on top-left corner. I want it to appear on the center. Can anybody help me, please.

@arafay993
Copy link

Well I make it worked by doing this,

<Suspense fallback={<div className="loader">
  <Spinner name="pacman" noFadeIn color="steelblue" />
  </div>}>
    <BrowserRouter basename="/app">
      <App/>
    </BrowserRouter>
  </Suspense>

and then in my index.css, I did this.

.loader { 
  position: absolute; 
  top: calc(50% - 4em); 
  left: calc(50% - 4em); 
  width: 6em; 
  height: 6em; 
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants