Code Monkey home page Code Monkey logo

Comments (3)

adamschwartz avatar adamschwartz commented on July 24, 2024

We kept vex generic so these sorts of things would be easy for people to implement themselves. Here's one way you might go about implementing a title bar into the default theme:

jsFiddle Demo

Coffeescript:

vex.dialog.alert
    className: 'vex-theme-default'
    unsafeMessage: '''
        <div class="title-bar">
            <h1>Title</h1>
        </div>
        <p>This is a vex alert with a title.</p>
    '''

Additional CSS:

.vex-theme-default .title-bar {
    margin: -1em;
    background: #ccc;
    padding: 1em;
    margin-bottom: 1em;
    border-radius: 5px 5px 0 0;
}

.vex-theme-default .title-bar h1 {
    font-size: 1.3em;
    font-weight: normal;
    line-height: 1.2em;
    margin: 0
}

screen shot 2014-04-14 at 11 42 06 am

from vex.

dileep021 avatar dileep021 commented on July 24, 2024

jsFiddle Demo is not working.

from vex.

adamschwartz avatar adamschwartz commented on July 24, 2024

@dileep021 try it now. 👍

from vex.

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.